:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Clear the Gradle environment.
:: 
:: Author: ZHANGQ
:: Create Time: 2020-06-26
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

@ECHO OFF

IF DEFINED PATH_BEFORE_GRADLE (
    SET GRADLE_HOME=
    ECHO Remove environment variables 'GRADLE_HOME'.

    SET PATH=%PATH_BEFORE_GRADLE%
    SET PATH_BEFORE_GRADLE=
    ECHO Recover environment variables 'PATH' from gradle environment.
)

IF DEFINED PROMPT_BEFORE_GRADLE (
    SET PROMPT="%PROMPT_BEFORE_GRADLE%"
    SET PROMPT_BEFORE_GRADLE=
    ECHO Recover environment variables 'PROMPT' from gradle environment.
)

IF DEFINED JAVA_ENV_SET_FROM_GRADLE (
    CALL inactivate-jdk.bat
    SET JAVA_ENV_SET_FROM_GRADLE=
)
